<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>登录</title>
<style>
#outer {
	width: 1400px;
	/*height: 1000px;*/
	margin: auto;
}

#top {
	width: 1400px;
	height: 100px;
	font-size: 40px;
	background-color: darkturquoise;
}

#top1 {
	width: 450px;
	height: 100px;
	text-align: center;
	line-height: 100px;
	font-family: 微软雅黑;
	float: left;
}

#top2 {
	width: 256px;
	height: 100px;
	float: left;
}
body {
    font-family: "Microsoft Yahei";
    font-size: 12px;
    margin: 0;
    background: #fff url("image/1.jpg") 50% 0 no-repeat;
}
</style>
<script type="text/javascript"
	src="js/jquery-1.9.0.min.js"></script>
<script type="text/javascript"
	src="js/login.js"></script>
<link href="css/login2.css"
	rel="stylesheet" type="text/css" />

<script>
	//给单选按钮绑定事件
	window.onload = function() {
		var ans = document.getElementsByName("office");
		for (var i = 0; i < ans.length; i++) {
			ans[i].onchange = setA;
		}
	}
	//当值改变时把当前选项呈现在指定区域
	function setA() {
		var ans = document.getElementsByName("office");
		var ord = document.getElementById("error");
		for (var i = 0; i < ans.length; i++)
			if (ans[i].checked == true) {
				ord.innerHTML = '已选择："' + ans[i].value + '"科室';
			}
	}

	//点击检查登录条件
	function checkLogin() {
		var office = document.getElementsByName("office");
		var result = document.getElementById("u").value;
		var password = document.getElementById("p").value;
		var checkedCount = 0;

		for (var i = 0; i < office.length; i++) {
			if (office[i].checked) {
				checkedCount++;
			}
		}
		if (!checkedCount) {
			document.getElementById("error").innerHTML = "请选择科室!";
		} else if (result == "" || result == " " || result == null) {
			document.getElementById("error").innerHTML = "用户名不能为空!";

		} else if (password == "" || password == " " || password == null) {
			document.getElementById("error").innerHTML = "密码不能为空!";
		} else {
			document.getElementById("login_form").submit();
		}

	}
</script>
</head>
<body>
	<div id="outer" style="border: 1px solid blue">
		<div id="top">
			<div id="top1">成都军区总医院HIS系统</div>

			<div id="top2">
				<img src="image/logo.jpg" width="100" height="100">

			</div>
		</div>
		<!-- 登錄註冊 -->
		<h1>
			军区总医院HIS登录系統<sup>V2017</sup>
		</h1>

		<div class="login"
			style="margin-top: 50px; border: 1px solid #3cfff8; border-radius: 5px; padding-bottom: 20px">

			<div class="header">
				<div class="switch" id="switch">
					<a class="switch_btn_focus" id="switch_qlogin"
						href="javascript:void(0);" tabindex="7">快速登录</a> <a
						class="switch_btn" id="switch_login" href="javascript:void(0);"
						tabindex="8">快速注册</a>

					<div class="switch_bottom" id="switch_bottom"
						style="position: absolute; width: 64px; left: 0px;"></div>
				</div>
			</div>


			<div class="web_qr_login" id="web_qr_login"
				style="display: block; height: 235px;">

				<!--登录-->
				<div class="web_login" id="web_login">


					<div class="login-box"
						style="text-align: center; border: 1px solid red">

						<div style="border: 1px solid red; margin-top: 5px; height: 30px">
							<span id="error" style="color: red; font-size: 20px">${requestScope.message }</span>
						</div>
						<div style="border: 1px solid red">
							<input type="radio" name="office" value="门诊" onclick="">门诊
							<input type="radio" name="office" value="诊断">诊断 <input
								type="radio" name="office" value="检查">检查 <input
								type="radio" name="office" value="住院">住院 <input
								type="radio" name="office" value="手术">手术 <input
								type="radio" name="office" value="护士">护士
						</div>
						<div class="login_form"
							style="border: 1px solid blue; margin-top: 10px; height: 115px">
							<form action="login" name="loginform" accept-charset="utf-8"
								id="login_form" class="loginForm" method="post">
								<input type="hidden" name="did" value="0" /> <input
									type="hidden" name="to" value="log" />

								<div class="uinArea" id="uinArea">
									<label class="input-tips" for="u">帐号：</label>

									<div class="inputOuter" id="uArea">

										<input type="text" id="u" name="username" class="inputstyle"
											placeholder="请输入用户名" />
									</div>
								</div>

								<div class="pwdArea" id="pwdArea">
									<label class="input-tips" for="p">密码：</label>

									<div class="inputOuter" id="pArea">

										<input type="password" id="p" name="password" class="inputstyle"
											placeholder="请输入密码" />
									</div>
								</div>

								<div
									style="padding-left: 50px; margin-top: 20px; border: 1px solid yellow; margin-top: -3px">
									<input type="button" value="登 录" style="width: 150px;"
										class="button_blue" onclick="checkLogin();">
								</div>
							</form>
						</div>

					</div>

				</div>
				<!--登录end-->
			</div>

			<!--注册-->
			<div class="qlogin" id="qlogin" style="display: none;">

				<div class="web_login">
					<form name="form2" id="regUser" accept-charset="utf-8" action=""
						method="post">
						<input type="hidden" name="to" value="reg" /> <input
							type="hidden" name="did" value="0" />
						<ul class="reg_form" id="reg-ul">
							<div id="userCue" class="cue">快速注册请注意格式</div>
							<li><label for="user" class="input-tips2">用户名：</label>

								<div class="inputOuter2">
									<input type="text" id="user" name="user" maxlength="16"
										class="inputstyle2" />
								</div></li>

							<li><label for="passwd" class="input-tips2">密码：</label>

								<div class="inputOuter2">
									<input type="password" id="passwd" name="passwd" maxlength="16"
										class="inputstyle2" />
								</div></li>
							<li><label for="passwd2" class="input-tips2">确认密码：</label>

								<div class="inputOuter2">
									<input type="password" id="passwd2" name="" maxlength="16"
										class="inputstyle2" />
								</div></li>

							<li><label for="qq" class="input-tips2">QQ：</label>

								<div class="inputOuter2">

									<input type="text" id="qq" name="qq" maxlength="10"
										class="inputstyle2" />
								</div></li>

							<li>
								<div class="inputArea">
									<input type="button" id="reg"
										style="margin-top: 10px; margin-left: 85px;"
										class="button_blue" value="同意协议并注册" /> <a href="#"
										class="zcxy" target="_blank">注册协议</a>
								</div>

							</li>
							<div class="cl"></div>
						</ul>
					</form>

				</div>

			</div>
			<!--注册end-->
		</div>
		<div class="jianyi">*推荐使用ie8或以上版本ie浏览器或Chrome内核浏览器访问本站系统*</div>


		<div>
		
	</div>
</body>
</html>